<template>
  <div class="dashboard-container">
  <el-row>
      <el-col :span="24">
        <div class="grid-content bg-purple" >
          <el-select v-model="value" placeholder="请选择" size="medium" class="select1" style="width:30%;">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>
          </el-select>
          <el-button type="primary" icon="el-icon-search" style="margin-left:20px;">查询</el-button>
        </div>
      </el-col>
    </el-row>

     <el-row>
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span class="card-panel-title">下个小时开启计划：</span>          
        </div>
        <div class="text-item">
          1号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>
          </br>
          2号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>
          </br>
          3号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>

        </div>
      </el-card>
    </el-row>
   

    

    <el-row :gutter="40" class="panel-group">
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="handleSetLineChartData('newVisitis')">
        <div class="card-panel-icon-wrapper icon-people">
          <svg-icon icon-class="table" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
            进水温度(℃)：
          </div>
          <span class="card-panel-num" >45℃</span>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="handleSetLineChartData('messages')">
        <div class="card-panel-icon-wrapper icon-message">
          <svg-icon icon-class="example" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
            出水温度(℃)：
          </div>
          <span class="card-panel-num" >67℃</span>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="handleSetLineChartData('purchases')">
        <div class="card-panel-icon-wrapper icon-money">
          <svg-icon icon-class="nested" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
             当天能耗(kW·h)
          </div>
          <span class="card-panel-num" >9,000 kW·h</span>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="handleSetLineChartData('shoppings')">
        <div class="card-panel-icon-wrapper icon-shopping">
          <svg-icon icon-class="eye" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">
             当月能耗(kW·h)
          </div>
          <span class="card-panel-num" >23,823 kW·h</span>
        </div>
      </div>
    </el-col>
  </el-row>
<el-row>
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span class="card-panel-title">正在运行机组：</span>          
        </div>
        <div class="text-item">
          1号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>
          </br>
          2号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>
          </br>
          3号站：冰蓄冷1号机、水蓄能2号机（正在运行）</br>

        </div>
      </el-card>
    </el-row>

  </div>
</template>

<script>
import { mapGetters } from 'vuex'
//import CountTo from 'count-to'
export default {
  name: 'OperationPlan',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
    methods: {
    handleSetLineChartData(type) {
      this.$emit('handleSetLineChartData', type)
    }
  },
      data() {
      return {
        options: [{
          value: 'enery1',
          label: '第一号能源站',
          
        }, {
          value: 'enery2',
          label: '第二号能源站'
        }, {
          value: 'enery3',
          label: '第三号能源站'
        }, {
          value: 'enery4',
          label: '第四号能源站'
        }, {
          value: 'enery5',
          label: '第五号能源站'
        }],
        value: ''
      }
    }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.panel-group {
  margin-top: 18px;

  .card-panel-col {
    margin-bottom: 32px;
  }

  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #666;
    background: #fff;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }

      .icon-people {
        background: #40c9c6;
      }

      .icon-message {
        background: #36a3f7;
      }

      .icon-money {
        background: #f4516c;
      }

      .icon-shopping {
        background: #34bfa3
      }
    }

    .icon-people {
      color: #40c9c6;
    }

    .icon-message {
      color: #36a3f7;
    }

    .icon-money {
      color: #f4516c;
    }

    .icon-shopping {
      color: #34bfa3
    }

    .card-panel-icon-wrapper {
      float: left;
      margin: 14px 0 0 14px;
      padding: 16px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
    }

    .card-panel-icon {
      float: left;
      font-size: 48px;
    }

    .card-panel-description {
      float: right;
      font-weight: bold;
      margin: 26px;
      margin-left: 0px;

      .card-panel-text {
        line-height: 18px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 16px;
        margin-bottom: 12px;
      }

      .card-panel-num {
        font-size: 20px;
      }
    }
  }
}

@media (max-width:550px) {
  .card-panel-description {
    display: none;
  }

  .card-panel-icon-wrapper {
    float: none !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;

    .svg-icon {
      display: block;
      margin: 14px auto !important;
      float: none !important;
    }
  }
}
.card-panel-title {
    line-height: 22px;
    color: black;
    font-size: 20px;
    margin-bottom: 12px;
  }
.text-item {
  line-height: 22px;
  color: black;
  font-size: 20px;
  margin-bottom: 12px;
}
</style>
